package com.clx.risk.flink.common.init;

import com.clx.risk.flink.common.model.env.Jdbc;
import com.clx.risk.flink.common.model.env.Redis;
import com.clx.risk.flink.common.model.env.Kafka;

public class Env {
    private static final String env = "sit";

    static {
        if ("sit".equals(env)) {
            risk = new Jdbc("fengkong-dev", "fengkong-dev@123", "10.107.4.2:3306/risk?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true", "com.mysql.cj.jdbc.Driver");
            redis = new Redis("10.107.4.3", "redis@123");
            kafka = new Kafka("10.107.4.229:9092", "flink");
        } else {
            risk = new Jdbc("fengkong-dev", "fengkong-dev@123", "10.107.3.2:3306/risk?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true", "com.mysql.cj.jdbc.Driver");
            redis = new Redis("10.107.3.3", "redis@123");
            kafka = new Kafka("10.107.3.229:9092", "flink");
        }
    }

    private static Jdbc risk;
    private static Redis redis;
    private static Kafka kafka;

    public static Jdbc getRisk() {
        return risk;
    }

    public static Redis getRedis() {
        return redis;
    }

    public static Kafka getKafka() {
        return kafka;
    }
}
